package com.spring.http;

import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class ReturnData {

	private int code =500;
	private Object message ="";
	private Object data;
	private String dataType ="1";//1json2视图
	
	/**
	 * 返回成功
	 * @param code
	 * @param message
	 * @param data
	 * @return 
	 */
	public static ReturnData getData(int code,Object message, Object data,String dataType) {
		ReturnData returnData = new ReturnData();
		returnData.setCode(code);
		returnData.setMessage(message);
		returnData.setData(data);
		returnData.setDataType(dataType);
		return returnData;
	}

}
